<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
	<th:block th:include="include :: header('鸡舍月报列表')" />
</head>
<body class="gray-bg">
     <div class="container-div">
		<div class="row" id="printArea">
			<div class="col-sm-12 search-collapse">
				<form id="formId">
					<div class="select-list">
						<ul>
							<li class="select-time">
								<label>日期： </label>
								<input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginTime]" lay-key="1" th:value="${beginTime}" >
								<span>-</span>
								<input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endTime]" lay-key="2"  th:value="${endTime}">
							</li>

							<li>
								<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
								<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
							</li>
						</ul>
					</div>
				</form>
			</div>

			<h3 align="center"> <span th:text="月报表" id="ordercode" hidden="hidden"></span> </h3>
			<div class="col-sm-12 select-table table-striped">
				<table id="bootstrap-table" data-mobile-responsive="true" class="table table-bordered"></table>
				<h3> <span class="fl-l" id="autograph" hidden="hidden"></span> </h3>
			</div>


			<div class="btn-group-sm" id="toolbar1" role="group">
				<a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:ncChickenMonthCensus:remove">
					<i class="fa fa-download"></i> 导出
				</a>
				<a class="btn btn-warning" id="print-btn" orderType = "21" nohide="1" >
					<i class="fa fa-download"></i> 打印
				</a>
				<!--            <div></div>-->
			</div>
		</div>
	</div>
    <div th:include="include :: footer"></div>
    <script th:inline="javascript">
        var editFlag = [[${@permission.hasPermi('system:ncChickenMonthCensus:edit')}]];
        var removeFlag = [[${@permission.hasPermi('system:ncChickenMonthCensus:remove')}]];
        var prefix = ctx + "system/ncChickenMonthCensus";

        $(function() {
            var options = {
                url: prefix + "/list",
                createUrl: prefix + "/add",
                updateUrl: prefix + "/edit/{id}",
                removeUrl: prefix + "/remove",
				exportUrl: prefix + "/export",
                modalName: "鸡舍月报",
		        showExport: false,
				showExport: false,
				showSearch: false,
				showRefresh: false,
				showColumns: false,
				showToggle: false,
				toolbar: 'toolbar1',
                sortName:'dataTime',
                sortOrder:'desc',
                columns: [
                    [
                    {
                        field : 'type',
                        title : '项目',
                        valign:"middle",
                        align:"center",
                        rowspan: 2,
                        formatter: function (value, row, index) {
                            if (value == 1) {
                                return '鸡';
                            }
                            else if(value == 2) {
                                return "饲料";
                            }
                        }
                    },
				{

					title : '上月库存',
                    valign:"middle",
                    align:"center",
                    colspan: 2
				},
				{
					title : '本月增加',
                    valign:"middle",
                    align:"center",
                    colspan: 2
				},
                    {
                        title : '本月减少',
                        valign:"middle",
                        align:"center",
                        colspan: 3
                    },

				{
					title : '本月盘存',
                    align:"center",
				},
				{
					title : '时间',
                    align:"center",

				}
		       ],
					[
                        {
                            field : 'lastFeedStack',
                            title : 'kg',
                            valign:"middle",
                            align:"center",
                            sortable: false
                        },
                        {
                            field : 'lastChickenStack',
                            title : '只',
                            valign:"middle",
                            align:"center",
                            sortable: false
                        },
                        {
                            field : 'feedStack',
                            title : 'kg',
                            valign:"middle",
                            align:"center",
                            sortable: false
                        },
                        {
                            field : 'chickenStack',
                            title : '只',
                            valign:"middle",
                            align:"center",
                            sortable: false
                        },
                        {
                            field : 'zhiChicken',
                            title : '直供',
                            valign:"middle",
                            align:"center",
                            sortable: false
                        },
                        {
                            field : 'neiChicken',
                            title : '内销',
                            valign:"middle",
                            align:"center",
                            sortable: false
                        },
						{
							field : 'siChicken',
							title : '死亡',
							valign:"middle",
							align:"center",
							sortable: false
						},


						{
                            field : 'stack',
                            valign:"middle",
                            align:"center",
                            sortable: false

                        },
                        {
                            field : 'dataTime',
                            valign:"middle",
                            align:"center",
                            sortable: false
						}


                    ]
				]

            };
            $.table.init(options);
        });
        setTitle("鸡舍管理-月报表",true)
    </script>
</body>
</html>